package homework4;

import java.util.Scanner;

public class Chapter05 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个正整数：");
        int a=sc.nextInt();
        int b=0;
        int c=a;
        while (a>0){
            b=b*10+a%10;
            a/=10;
        }
        if (b==c){
            System.out.println("这个数是回文数");
        }else {
            System.out.println("这个数不是回文数");
        }
    }
}
